<?
ob_start();
session_start();
include("../conf/config.php");
include("../conf/database.php");
include("../conf/tools.php");

$curTime=getIndianDateTime();
$news_id=$_GET["news_id"];
$mode=$_GET["mode"]; 

foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }

//$arr_data["rec_status"]=1;


if($news_id>0){

update_qry("bkit_news",$arr_data,"news_id=".$news_id);
qry_data("update bkit_news set last_updated='".$curTime."' where news_id=".$news_id);

}
else{

	$news_id=insert_qry("bkit_news",$arr_data);
	qry_data("update bkit_news set posted_date='".$curTime."' where news_id=".$news_id);

}



header("location:edit_news.php?mode=edit&news_id=".$news_id);
?>



